﻿
using Maticsoft.BLL;
using Maticsoft.Model;
using System;
using System.Web.UI.HtmlControls;

public partial class WebPage_SheZhi_Duanxin : SystemBBasePage
{
    
    private Maticsoft.BLL.System systems = new Maticsoft.BLL.System();

    private void getSms()
    {
        Maticsoft.Model.System model = new Maticsoft.Model.System();
        model = this.systems.GetModel(1);
        if (model != null)
        {
            this.sms_user.Value = model.smsuser;
            this.sms_pass.Value = model.smspass;
            this.sms_interval.Value = model.smsinterval;
        }
    }

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        this.HeaderControl1.Select = "shezhi";
        if (base.Request.HttpMethod == "POST")
        {
            this.setSms();
        }
        this.getSms();
    }

    private void setSms()
    {
        Maticsoft.Model.System model = new Maticsoft.Model.System();
        model = this.systems.GetModel(1);
        model.smsuser = this.sms_user.Value.Trim();
        model.smspass = this.sms_pass.Value.Trim();
        model.smsinterval = this.sms_interval.Value;
        this.systems.Update(model);
        base.SetSuccess("设置成功");
    }
}

